package com.zmc.lostfound.post.vo;

import com.zmc.lostfound.common.valid.AddGroup;
import com.zmc.lostfound.common.valid.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * @author zmc, gxc
 * @description 帖子&收藏关联信息新增/修改请求体
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("帖子&收藏关联信息新增/修改请求体")
public class PostStarSaveVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 帖子&收藏关联id
     */
    @ApiModelProperty("帖子&收藏关联id")
    @Null(message = "新增帖子&收藏关联信息: 帖子&收藏关联id必须为空", groups = {AddGroup.class})
    @NotNull(message = "修改帖子&收藏关联信息: 帖子&收藏关联id不能为空", groups = {UpdateGroup.class})
    @Min(value = 1, message = "修改帖子&收藏关联信息: 帖子&收藏关联id必须大于等于1", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 帖子id
     */
    @ApiModelProperty("帖子id")
    @NotNull(message = "帖子id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 1, message = "帖子id必须大于等于1", groups = {AddGroup.class, UpdateGroup.class})
    private Long postId;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    @NotNull(message = "用户id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 1, message = "用户id必须大于等于1", groups = {AddGroup.class, UpdateGroup.class})
    private Long userId;

}
